package com.test.enumerater;

/**
 * =============================================================
 * Version          Author          Date            Description
 * 1.0             01144895        2018/1/27             创建
 * =============================================================
 */
enum Shrubbery
{
    GROUND, CRAWLING, HANGING
}

public class Enum_0
{

    public static void main(String[] args)
    {

        for (Shrubbery s : Shrubbery.values())
        {
            System.out.println(s + " ordinal: " + s.ordinal());
            System.out.println(s.compareTo(Shrubbery.CRAWLING));
            System.out.println(s.equals(Shrubbery.CRAWLING));
            System.out.println(s == Shrubbery.CRAWLING);
            System.out.println(s.getDeclaringClass());
            System.out.println(s.name());
            System.out.println("--------------");
        }
    }
}
